Optimal. Leaf size=102 \[ \frac {a^3 x}{c^3}-\frac {8 a^3 \tan (e+f x)}{5 c^3 f (1-\sec (e+f x))^3}+\frac {4 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))^2}-\frac {26 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 9, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3988, 3862,
4007, 4004, 3879, 3881, 3882, 3884, 4085} \begin {gather*} -\frac {26 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))}+\frac {4 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))^2}-\frac {8 a^3 \tan (e+f x)}{5 c^3 f (1-\sec (e+f x))^3}+\frac {a^3 x}{c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3862
Rule 3879
Rule 3881
Rule 3882
Rule 3884
Rule 3988
Rule 4004
Rule 4007
Rule 4085
Rubi steps
\begin {align*} \int \frac {(a+a \sec (e+f x))^3}{(c-c \sec (e+f x))^3} \, dx &=\frac {\int \left (\frac {a^3}{(1-\sec (e+f x))^3}+\frac {3 a^3 \sec (e+f x)}{(1-\sec (e+f x))^3}+\frac {3 a^3 \sec ^2(e+f x)}{(1-\sec (e+f x))^3}+\frac {a^3 \sec ^3(e+f x)}{(1-\sec (e+f x))^3}\right ) \, dx}{c^3}\\ &=\frac {a^3 \int \frac {1}{(1-\sec (e+f x))^3} \, dx}{c^3}+\frac {a^3 \int \frac {\sec ^3(e+f x)}{(1-\sec (e+f x))^3} \, dx}{c^3}+\frac {\left (3 a^3\right ) \int \frac {\sec (e+f x)}{(1-\sec (e+f x))^3} \, dx}{c^3}+\frac {\left (3 a^3\right ) \int \frac {\sec ^2(e+f x)}{(1-\sec (e+f x))^3} \, dx}{c^3}\\ &=-\frac {8 a^3 \tan (e+f x)}{5 c^3 f (1-\sec (e+f x))^3}-\frac {a^3 \int \frac {-5-2 \sec (e+f x)}{(1-\sec (e+f x))^2} \, dx}{5 c^3}+\frac {a^3 \int \frac {(-3-5 \sec (e+f x)) \sec (e+f x)}{(1-\sec (e+f x))^2} \, dx}{5 c^3}+\frac {\left (6 a^3\right ) \int \frac {\sec (e+f x)}{(1-\sec (e+f x))^2} \, dx}{5 c^3}-\frac {\left (9 a^3\right ) \int \frac {\sec (e+f x)}{(1-\sec (e+f x))^2} \, dx}{5 c^3}\\ &=-\frac {8 a^3 \tan (e+f x)}{5 c^3 f (1-\sec (e+f x))^3}+\frac {4 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))^2}+\frac {a^3 \int \frac {15+7 \sec (e+f x)}{1-\sec (e+f x)} \, dx}{15 c^3}+\frac {\left (2 a^3\right ) \int \frac {\sec (e+f x)}{1-\sec (e+f x)} \, dx}{5 c^3}+\frac {\left (7 a^3\right ) \int \frac {\sec (e+f x)}{1-\sec (e+f x)} \, dx}{15 c^3}-\frac {\left (3 a^3\right ) \int \frac {\sec (e+f x)}{1-\sec (e+f x)} \, dx}{5 c^3}\\ &=\frac {a^3 x}{c^3}-\frac {8 a^3 \tan (e+f x)}{5 c^3 f (1-\sec (e+f x))^3}+\frac {4 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))^2}-\frac {4 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))}+\frac {\left (22 a^3\right ) \int \frac {\sec (e+f x)}{1-\sec (e+f x)} \, dx}{15 c^3}\\ &=\frac {a^3 x}{c^3}-\frac {8 a^3 \tan (e+f x)}{5 c^3 f (1-\sec (e+f x))^3}+\frac {4 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))^2}-\frac {26 a^3 \tan (e+f x)}{15 c^3 f (1-\sec (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.09, size = 53, normalized size = 0.52 \begin {gather*} \frac {2 a^3 \cot ^5\left (\frac {e}{2}+\frac {f x}{2}\right ) \, _2F_1\left (-\frac {5}{2},1;-\frac {3}{2};-\tan ^2\left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{5 c^3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 60, normalized size = 0.59
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {1}{3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )}{f \,c^{3}}\) | \(60\) |
default | \(\frac {2 a^{3} \left (\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {1}{3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )}{f \,c^{3}}\) | \(60\) |
risch | \(\frac {a^{3} x}{c^{3}}+\frac {4 i a^{3} \left (45 \,{\mathrm e}^{4 i \left (f x +e \right )}-90 \,{\mathrm e}^{3 i \left (f x +e \right )}+140 \,{\mathrm e}^{2 i \left (f x +e \right )}-70 \,{\mathrm e}^{i \left (f x +e \right )}+23\right )}{15 f \,c^{3} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{5}}\) | \(81\) |
norman | \(\frac {\frac {a^{3} x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}+\frac {a^{3} x \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}+\frac {2 a^{3}}{5 c f}-\frac {22 a^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 c f}+\frac {56 a^{3} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 c f}-\frac {14 a^{3} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 c f}+\frac {2 a^{3} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {2 a^{3} x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2} c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\) | \(189\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 306 vs.
\(2 (96) = 192\).
time = 0.50, size = 306, normalized size = 3.00 \begin {gather*} \frac {a^{3} {\left (\frac {120 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c^{3}} - \frac {{\left (\frac {20 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {105 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}}\right )} + \frac {a^{3} {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {15 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}} - \frac {3 \, a^{3} {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {15 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}} - \frac {9 \, a^{3} {\left (\frac {5 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 1\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}}}{60 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.11, size = 137, normalized size = 1.34 \begin {gather*} \frac {46 \, a^{3} \cos \left (f x + e\right )^{3} - 2 \, a^{3} \cos \left (f x + e\right )^{2} - 22 \, a^{3} \cos \left (f x + e\right ) + 26 \, a^{3} + 15 \, {\left (a^{3} f x \cos \left (f x + e\right )^{2} - 2 \, a^{3} f x \cos \left (f x + e\right ) + a^{3} f x\right )} \sin \left (f x + e\right )}{15 \, {\left (c^{3} f \cos \left (f x + e\right )^{2} - 2 \, c^{3} f \cos \left (f x + e\right ) + c^{3} f\right )} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {a^{3} \left (\int \frac {3 \sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {3 \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {1}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx\right )}{c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 73, normalized size = 0.72 \begin {gather*} \frac {\frac {15 \, {\left (f x + e\right )} a^{3}}{c^{3}} + \frac {2 \, {\left (15 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 5 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, a^{3}\right )}}{c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5}}}{15 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.38, size = 96, normalized size = 0.94 \begin {gather*} \frac {a^3\,x}{c^3}+\frac {\frac {2\,a^3\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{5}-\frac {2\,a^3\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{3}+2\,a^3\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{c^3\,f\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________